package router

import (
	"github.com/gin-gonic/gin"

	"k8s-admin/controller/kubernetes"
	"k8s-admin/middleware"
)

func StartDeploymentRoute(r *gin.Engine) {
	deployment := r.Group("deployment/:cid")
	deployment.Use(middleware.K8sCache())
	{
		deployment.GET("getClusterDeploymentList", kubernetes.K8sClusterDeployment)
		deployment.GET("getClusterDeployment", kubernetes.GetK8sClusterDeployment)
		deployment.PUT("upClusterDeployment", kubernetes.K8sClusterDeploymentUp)
		deployment.DELETE("deleteClusterDeployment", kubernetes.K8sClusterDeleteDeployment)
		deployment.POST("createClusterDeployment", kubernetes.CreateK8sClusterDeployment)
		deployment.PUT("createClusterDeploymentFile", kubernetes.CreateClusterDeploymentFile)
		deployment.GET("getClusterDeploymentYaml", kubernetes.GetK8sClusterDeploymentYaml)
		deployment.POST("createClusterDeploymentUI", kubernetes.CreateClusterDeploymentUI)
	}

}
